// 判断素数

#include <stdio.h>
#include <stdbool.h>
#include <math.h>

int main(int argc, char const *argv[])
{
    int x;

    scanf("%d", &x);

    int i;
    bool isPrime = true;    // x is a prime num
    if (x == 1)
    {
        printf("1 is not a prime number.\n");
    }
    else
    {
        float top = x;
        for (i = 2; i < top; i++)
        {
            printf("%d\n", i);
            if (x % i == 0)
            {
                isPrime = false;
                break;
            }
            top = ceil(x / i);
        }
        if (isPrime)
        {
            printf("%d is a prime num\n", x);
        }
        else
        {
            printf("%d is not a prime num\n", x);
        }
    }
    
    return 0;
}